from flask import Blueprint

bp_coupon =Blueprint('coupon',__name__)

@bp_coupon.route('/add')
def add():
    return '添加优惠'

from flask import Flask
from coupon import bp_coupon
app = Flask(__name__)
#注册蓝图
app.register_blueprint(bp_coupon,url_prefix='/coupon')
from flask_cors import CORS
cors = CORS(app)


if __name__ == "__main__":
    app.run(debug=True)